<%@ page import="com.oval.foundation.DefaultParams" %>
<%
    String realPrintPath = pageContext.getRequest().getScheme()
            + "://"
            + DefaultParams.findParam("printserver")
            + ":"
            + DefaultParams.findParam("printserverport")
            + "/oval/Dispatcher";
    String realJSPPrintPath = pageContext.getRequest().getScheme()
            + "://"
            + DefaultParams.findParam("printserver")
            + ":"
            + DefaultParams.findParam("printserverport")
            + "/oval/common/";

    StringBuffer requestURL = request.getRequestURL();
    String requestURI = request.getRequestURI();
    requestURL.reverse();
    requestURL.replace(0, requestURI.length(), "");

    String sid = session.getId();
    // if you use the websphere, do uncomment the following code.
    if(com.oval.foundation.util.Constants.APP_VERSION.equals("WAS"))
    {
	    Cookie[] cookie = request.getCookies();
	    for (int __i = 0; __i < cookie.length; __i++)
	    {
	        if (cookie[__i].getName().trim().equalsIgnoreCase("JSESSIONID"))
	        {
	            sid = cookie[__i].getValue().trim();
	            break;
	        }
	    }
    }

    String realPrintPath2 = requestURL.reverse()
            + request.getContextPath()
            + "/reportDirector;jsessionid=" + sid + "?type=fp3";
%>
